package cn.dogger.easyboot.init.initEntity;

import cn.dogger.easyboot.init.annotation.InitField;
import cn.dogger.easyboot.init.annotation.InitTable;
import cn.dogger.easyboot.init.enums.FieldTypeEnums;
import lombok.Data;
import java.time.LocalDateTime;

/**
 * 系统访问记录
 *
 * @author dogger
 *  2022-07-27
 */
@Data
@InitTable(name = "sys_login_info",remark = "系统访问记录")
public class SysLoginInfo{

    @InitField(remark = "访问ID",type = FieldTypeEnums.int_,name = "info_id",keyFlag = true)
    private Long infoId;

    @InitField(remark = "用户账号",name = "user_name",fieldLength = 50)
    private String userName;

    @InitField(remark = "登录IP地址",name = "ipaddr",fieldLength = 100)
    private String ipaddr;

    @InitField(remark = "登录地点",name = "login_location",fieldLength = 50)
    private String loginLocation;

    @InitField(remark = "浏览器类型",name = "browser",fieldLength = 50)
    private String browser;

    @InitField(remark = "操作系统",name = "os",fieldLength = 50)
    private String os;

    @InitField(remark = "登录状态（1成功 0失败）",name = "status",fieldLength = 1)
    private String status;

    @InitField(remark = "提示消息",name = "msg",fieldLength = 100)
    private String msg;

    @InitField(remark = "访问时间", name = "login_time",type = FieldTypeEnums.datetime_)
    private LocalDateTime loginTime;

}